<?php
class props extends ujn_controller {
	var $auto_render = false;
	
	public function lists() {
		$data = array(
			'flag' => 1,
			'lists' => mdl_global_props::getInstance()->getAll(),
		);
		echo json_encode( $data );
	}
	
	public function get(){
		$data = array(
			'flag' => 1,
			'lists' => mdl_global_props::getInstance()->getPID( $_POST['pid'] ),
		);
		echo json_encode($data);
	}
	
	public function edit() {
		$data = array(
			'flag' => mdl_global_props::getInstance()->edit( filterPost( $_POST ) ), 
		);
		echo json_encode( $data );
	}
}